package com.itheima.mapper;
import com.itheima.pojo.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Mapper
public interface EmpMapper {



  @Select("select  * from emp")
    List<Emp> sb();


  @Delete("delete  from emp  where id=#{id}")
    List<Emp> nt(Integer id);


  @Insert("\"insert into emp(username, name, gender, image, job, entrydate, dept_id, create_time, update_time) \" +\n" +
          "\n" +
          "    \" values(#{username},#{name},#{gender},#{image},#{job},#{entrydate},#{deptId},#{createTime},#{updateTime})\"\n")
  List<Emp> rb();


  @Select("select * from emp where  id = #{id}")
  List<Emp> bis(Integer id);

}
